import Mock from 'mockjs'

Mock.mock('/api/user/menu', 'get', {
  //这里路径和接口路径一致就可以了，请求类型也是
  code: 200,
  data: [
    {
      path: '/cvmagic/dashboard',
      title: '仪表盘',
      icon: 'icon-menu-work',
      children: [
        {
          path: '',
          title: '数据',
          component: null,
          children: [
            {
              path: '/cvmagic/dashboard/workplace',
              title: '工作台',
              component: 'dashboard/workplace/index',
              children: [],
            },
          ],
        },
      ],
    },
    {
      path: '/cvmagic/system',
      title: '超级管理员',
      icon: 'icon-chaojiguanliyuan',
      children: [
        {
          path: '',
          title: '权限',
          icon: '',
          children: [
            {
              path: '/cvmagic/system/user',
              title: '用户管理',
              component: 'system/user/index',
              icon: '',
              meta: '',
              ishow: '',
              children: [],
            },
            {
              path: '/cvmagic/system/role',
              title: '角色管理',
              component: 'system/role/index',
              children: [],
            },
            {
              path: '/cvmagic/system/menu',
              title: '菜单管理',
              component: 'system/menu/index',
              children: [],
            },
          ],
        },
      ],
    },

    {
      path: '/cvmagic/goods',
      title: '商品管理',
      icon: 'icon-menu-goods',
      children: [
        {
          path: '',
          title: '数据',
          component: null,
          children: [
            {
              path: '/cvmagic/goods/category',
              title: '商品分类',
              component: 'goods/category/index',
              children: [],
            },
            {
              path: '/cvmagic/goods/attribute',
              title: '商品参数',
              component: 'goods/attribute/index',
              children: [],
            },
            {
              path: '/cvmagic/goods/list',
              title: '商品列表',
              component: 'goods/list/index',
              children: [],
            },
            {
              path: '/cvmagic/goods/comment',
              title: '商品评论',
              component: 'goods/comment/index',
              children: [],
            },
          ],
        },
      ],
    },

    {
      path: '/cvmagic/order',
      title: '订单管理',
      icon: 'icon-menu-order',
      children: [
        {
          path: '',
          title: '数据',
          component: null,
          children: [
            {
              path: '/cvmagic/order/list',
              title: '订单列表',
              component: 'order/list/index',
              children: [],
            },
          ],
        },
      ],
    },

    {
      path: '/cvmagic/user',
      title: '用户管理',
      icon: 'icon-menu-user',
      children: [
        {
          path: '',
          title: '数据',
          component: null,
          children: [
            {
              path: '/cvmagic/user/list',
              title: '用户列表',
              component: 'user/list/index',
              children: [],
            },
          ],
        },
      ],
    },

    {
      path: '/cvmagic/set',
      title: '系统设置',
      icon: 'icon-menu-set',
      children: [
        {
          path: '',
          title: '数据',
          component: null,
          children: [
            {
              path: '/cvmagic/set/test',
              title: '用户列表',
              component: 'set/test/index',
              children: [],
            },
          ],
        },
      ],
    },
  ],
  msg: 'addUser succesful',
})
